import turbogears   as tg

import logging
import cherrypy
import sqlobject
import kaizen


from sqlalchemy.exceptions import SQLError
from sqlalchemy import and_
from kaizen.model import Action, session
from kaizen.model import Project

from kaizen.resource import Resource
from turbogears import identity, expose, validate, validators, redirect, error_handler, flash, view
import time

from genshi.template import TemplateLoader
import kaizen.feedparser

log = logging.getLogger("kaizen.subcontrollers.feed")

class FeedController:
      
    @expose(template="kaizen.templates.rss_nextActions", content_type='text/xml; charset=utf-8')
    def get_feed_data(self):
      actions = session.query(Action).select(and_(Action.c.priority==0, Action.c.closed==False))
      return dict(actions=actions)

